import Vue from 'vue'
import App from './App'
// 导入vuex文件
import store from './store'  

// 导入全局自定义组件
import MescrollBody from "components/mescroll-uni/mescroll-body.vue"
import MescrollUni from "components/mescroll-uni/mescroll-uni.vue"
// 用户授权弹窗
import Accredit from "@/components/accredit/index.vue"
import vRegister from "@/components/register/register.vue"
import vLoading from "@/components/loading/loading.vue"

// 注册全局自定义组件
Vue.component("mescroll-body", MescrollBody)
Vue.component("mescroll-uni", MescrollUni)
Vue.component('accredit', Accredit)
Vue.component('v-register', vRegister)
Vue.component('v-loading', vLoading)

// 挂载vuex到vue实例对象上
Vue.prototype.$store = store 
// 加载方法简写
Vue.prototype.showLoading = (title='加载中') => uni.showLoading({ title })
Vue.prototype.hideLoading = () => uni.hideLoading()
// 下一页
Vue.prototype.onGoNext = (url) => uni.navigateTo({ url })

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
